package com.kuzlak.cms.module.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kuzlak.cms.module.sys.entity.SysAccounts;
import com.kuzlak.cms.module.sys.mapper.SysAccountsMapper;
import com.kuzlak.cms.module.sys.service.SysAccountsService;
import org.springframework.stereotype.Service;

/**
* @author hesenjan
* @description 针对表【sys_accounts】的数据库操作Service实现
* @createDate 2024-11-30 19:24:14
*/
@Service
public class SysAccountsServiceImpl extends ServiceImpl<SysAccountsMapper, SysAccounts>
    implements SysAccountsService{

    @Override
    public SysAccounts getUserByPhone(String username) {
        LambdaQueryWrapper<SysAccounts> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(SysAccounts::getUserName,username);
        wrapper.last("LIMIT 1");
        return this.getOne(wrapper);

    }
}




